package cn.hk.archives.service.impl;

import cn.hk.archives.domain.ArchivesCommon;
import cn.hk.archives.domain.vo.ArchivesVo;
import cn.hk.archives.mapper.ArchivesCommonMapper;
import cn.hk.archives.service.ArchivesCommonService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 普通人建档 服务实现类
 * </p>
 *
 * @author xu
 * @since 2023-05-17
 */
@Service
public class ArchivesCommonServiceImpl extends ServiceImpl<ArchivesCommonMapper, ArchivesCommon> implements ArchivesCommonService {
    @Autowired
    private ArchivesCommonMapper archivesCommonMapper;
    @Override
    public ArchivesVo getUserArchivesCommonByUserId(Long userId) {
        return archivesCommonMapper.selectUserArchivesCommonByUserId(userId);
    }

    @Override
    public Boolean addArchivesCommon(ArchivesVo archivesVo) {
        return archivesCommonMapper.insertArchivesCommon(archivesVo);
    }

    @Override
    public Boolean editArchivesCommon(ArchivesVo archivesVo) {
        return archivesCommonMapper.updateArchivesCommon(archivesVo);
    }
}
